// 二分法与暴力法相结合
var minArray = function (numbers) {
	let low = 0;
	let high = numbers.length - 1;
	while (low < high) {
		const mid = Math.floor((low + high) / 2);
		if (numbers[mid] < numbers[high]) {
			high = mid;
		} else if (numbers[mid] > numbers[high]) {
			low = mid + 1;
		} else {
			high -= 1;
		}
	}
	return numbers[low];
};
let numbers = [2,2,2,0,1];
console.log(minArray(numbers));